package com.campusexpresspickup.mapper;

import com.campusexpresspickup.entity.UserMenu;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.campusexpresspickup.page.UserMenuPage;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 后台菜单表 Mapper 接口
 * </p>
 *
 * @author lq
 * @since 2021-11-17
 */
@Mapper
public interface UserMenuMapper extends BaseMapper<UserMenu> {

  /**
   * 根据后台用户ID获取菜单
   */
  List<UserMenu> getMenuList(@Param("userId") Integer userId);

  /**
   * 根据角色ID获取菜单
   */
  List<UserMenu> getMenuListByRoleId(@Param("roleId") Integer roleId);

  List<UserMenu> findMenuList(@Param("userMenuPage") UserMenuPage userMenuPage);
}
